package top.hihuzi.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.hihuzi.bean.Person;

import java.util.function.Supplier;

@RestController
public class ProvideController {

    @RequestMapping("/provide")
    public Person tosay() {
        Supplier<Person> person = Person::new;
        Person person1 = person.get();
        person1.setName("王二小");
        person1.setAge(22);
        return person1;
    }
}
